<!DOCTYPE html>
<html lang='en'>
<head>
  <meta charset='UTF-8'>
  <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport'>
  <title>3-1 data属性</title>
</head>
<body>
<div id='app'>
  <div>count: {{ count }}</div>
  <div>{{ message }}</div>
</div>
<script src='../lib/vue.global.js' type='text/javascript'></script>
<script>
  const { createApp } = Vue
  const app = createApp({
    data() {
      return {
        count: 0
      }
    }
  })
  const vm = app.mount('#app')
  console.log(vm.$data.count)
  console.log(vm.count)

  vm.$data.count++
  console.log(vm.count)

  vm.count++
  console.log(vm.$data.count)

  vm.message = 'hello'
</script>
</body>
</html>
